package com.scorpio.basic.service.impl;

import com.scorpio.basic.domain.BannerEntity;
import com.scorpio.basic.dto.BannerDTO;
import com.scorpio.basic.mapper.BannerMapper;
import com.scorpio.basic.service.BannerService;
import com.scorpio.common.service.impl.BaseServiceImpl;
import com.scorpio.common.utils.ConvertUtils;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BannerServiceImpl extends BaseServiceImpl<BannerMapper, BannerEntity> implements BannerService {

    @Override
    public List<BannerDTO> list() {
        List<BannerEntity> bannerList = baseDao.appList();
        return ConvertUtils.sourceToTarget(bannerList, BannerDTO.class);
    }
}
